Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Question Protected by Community Bot
Edit for brevity and clarity
Source Link
codeforester
  • 43.8k
  • 21
  • 123
  • 159

Hi I'm pretty new at programming and I'm trying to split a string:

'QH QD JC KD JS'

into a list like:

['QH', 'QD', 'JC', 'KD', 'JS']

I have tried splitting but it didn't seem to work. How would I go about doing this?

Thanks

Hi I'm pretty new at programming and I'm trying to split a string:

'QH QD JC KD JS'

into a list like:

['QH', 'QD', 'JC', 'KD', 'JS']

I have tried splitting but it didn't seem to work. How would I go about doing this?

Thanks

I'm trying to split a string:

'QH QD JC KD JS'

into a list like:

['QH', 'QD', 'JC', 'KD', 'JS']

How would I go about doing this?

Source Link
Nicole
  • 461
  • 1
  • 4
  • 5

String to list in Python

Hi I'm pretty new at programming and I'm trying to split a string:

'QH QD JC KD JS'

into a list like:

['QH', 'QD', 'JC', 'KD', 'JS']

I have tried splitting but it didn't seem to work. How would I go about doing this?

Thanks

lang-py

AltStyle によって変換されたページ (->オリジナル) /