ids = [
'7d38c515-d543-4186-a6a6-e46d4e356a81' # location 1
'f384fc68-3030-473f-95a8-52d5fee6cfd4' # location 2
'b27fef7f-9e5d-4af5-8596-a6949dd257a5' # location 3
]
It look us an unfortunate amount of time to realize we were missing commas in that list. Python blissfully will concatenate string elements inside of a list for you.
bad_list = ['a' 'b' 'c']
bad_list[0] == 'abc'
True
This is because ,
"a""b" == "ab"I'm failing to come up with a helpful example of where this behavior is useful though.
True
No comments:
Post a Comment