python输出‘hello world!’

# -*- coding: UTF-8 -*-

# Filename : hello.py
# author by : kilin 

#输出hello world!

print('Hello World!')

hw_str='Hello World!'
print(hw_str)

hw_str='Hello World!'
print(hw_str[0:])
print(hw_str[0:12])

def hello_def():
    print('Hello World!')
hello_def()

hw_list=['Hello World!']
print(hw_list[0])

hw_tup=('Hello World!',)
print(hw_tup[0])

hw_dict={'hw':'Hello World!'}
print(hw_dict['hw'])

hw_set={'Hello World!'}
for hw in hw_set:
    print(hw)

if True:
    print('Hello World!')
else:
    print('Hello World!')

while True:
    print('Hello World!')
    break

你可能感兴趣的:(python)