so I’m trying to split a string like “19 01 23 75 03 34” into an array. Normally I would use list() and then just strip the spaces, but because these are two digit numbers, that separates them into one digit numbers. I’m still new to python, so sorry if there’s a really easy answer to this! Thanks for your help.
Share
Use
str.split:If you also want to parse them to integers you can use
mapandint:See it working online: ideone