看看你的生日是否在圆周率里面

filename = 'pi.text'#在这里放置pi的数字文件
with open(filename) as file_object:
    lines = file_object.readlines()
pi_string = ''
for line in lines:
    pi_string+=line.rstrip()
birthday = input("your birthday\n")
if birthday in pi_string:
    print('u birthday is in pi ')
else:
    print("u birthday is not in pi")

 

你可能感兴趣的:(有意思的东东,python)