# 单行注释
print("hello world")
'''
多行注释测试
python
'''
"""
多行注释测试
"""
user_name = 'Charlie'
user_age = 8
print(type(user_name))
# <class 'str'>
print("读者名:", user_name,"年龄:",user_age, sep='|')
# 读者名:|Charlie|年龄:|8
s1 = "Hello," 'Charlie'
print(s1)
s2 = "Python "
s3 = "is Funny"
s4 = s2 + s3
print(s4)
s1 = "这本书的价格是:"
s2 = 98
print(s1 + str(s2))
#字符串的分割与链接
s = 'crazyit.org is a good site'
print(s.split())
print(s.split(None, 2))
print(s.split('.'))
list = s.split()
print(list)
#使用'/'作为分割符,将list连接成字符串
print('/'.join(list))
#使用'.'作为分割符,将list连接成字符串
print('.'.join(list))
a = "abcdefghijklmnopqrstuvwxyz"
print(a[2:8:2])
# == 与 is的区别
# == 判断值是否相同,is判断是否为同一个对象
import time
a = time.gmtime()
b = time.gmtime()
print(a == b)
print(a is b)
print(id(a),' ',id(b))
#and or not
print(not False)
print(5 > 3 and 20.0 > 10)
print(4 >= 5 or "c" > "a")
# in
s = "nmb"
print('n' in s)
print('v' in s)