摘要:
x = 5 if x > 6 : print("x is greater than six")elif x > 4 and x == 5: print("{}".format(x))else: print("x is not greater than four") 5 y = ['Jan','Feb 阅读全文
摘要:
empty_dict = {}a_dict = {'one':1,'two':2,'three':3}print("{}".format(a_dict))print("{}".format(len(a_dict)))another_dict = {'x':'printer','y':5,'z':[' 阅读全文
摘要:
my_tuple = ('x','y','z')print("{}".format(my_tuple))print("{}".format(len(my_tuple)))longer_tuple = my_tuple + my_tupleprint("{}".format(longer_tuple) 阅读全文
摘要:
a_list = [1,2,3]another_list = ['printer',5,['start','circle','9']]a_new_list = a_list[:] print("{}".format(a_new_list))a = 2 in a_listprint("{}".form 阅读全文