states.split()
will return
(states.split()
将返回)
['Alaska',
'Alabama',
'Arkansas',
'American',
'Samoa',
'Arizona',
'California',
'Colorado']
If you need one random from them, then you have to use the random
module:
(如果你需要一个随机,那么你必须使用random
模块:)
import random
states = "... ..."
random_state = random.choice(states.split())
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…