1 if __name__==‘__main__‘: 2 # ff=input() 3 # print(type(ff))#<class ‘str‘> 4 # a=int(input()) 5 # a1=raw_input()#python3 舍弃,python2还用 6 line=sys.stdin.readline() 7 line1=line.strip(‘\n‘) 8 # line1 = sys.stdin.readline().strip(‘\n‘) 9 # line2 = input() 10 # input("hhhh") 11 line2=[int(i) for i in input("请输入:\n").split(‘ ‘)] 12 # line2=input().split(‘ ‘)#[‘1‘, ‘2‘] 13 print(line1,line2) 14 print(type(line1),type(line2))#<class ‘str‘> <class ‘list‘> 15 print(len(line1), len(line2))#4 2 16 a=[int(n) for n in sys.stdin.readline().strip(‘\n‘).split(‘ ‘)] 17 print(a) 18 print(type(a)) 19 c=[[0 for i in range(3)] for i in range(3)] 20 print(c) 21 # b=[int(i) for i in sys.stdin.readline().split(‘ ‘)]
时间: 2024-11-09 09:32:34