而我讀this 具有此代碼 We can also do that this way:
We'd have 500000 beans, 500 jars, and 5 crates.
,當我修改爲打氣498 print ("We can also do that this way:")
print (f"We'd have {secret_formula(start_point)} bea
如何使用python 3.6 F-String來執行此格式? person = {'name': 'Jenne', 'age': 23}
print('My name {0[name]} and my age {1[age]}'.format(person, person))
print('My name {0} and my age {1}'.format(person['name'],
如果我僅使用原始字符串,但只要將f添加到r,此代碼就可以工作。它停止工作。有沒有辦法讓F字符串與原始字符串一起工作? import re
lines = '''
04/20/2009; 04/20/09; 4/20/09; 4/3/09
Mar-20-2009; Mar 20, 2009; March 20, 2009; Mar. 20, 2009; Mar 20 200