Cnverting a Liststring into a Listlist...
Hello everyone, first post ever... can someone point me in the right direccion? I need to format the firt list into the same format as the second one. Python
print(incorrentformatlist)
'AsKh', '2sAc', '7hQs',...........
print(correctformatlist)
['As', 'Kh', '2s', 'Ac', '7h', 'Qs',..............]
\#I tried:
for h in incorrect_format_list:
split_lines = h.split(", ")
\#but the print output is this:
'AsKh'
'2sKh'
'7hQs'
... #rather than what i need: ['As', 'Kh', '2s', 'Ac', '7h', 'Qs'..............]
/r/Python
https://redd.it/10fvovh
Hello everyone, first post ever... can someone point me in the right direccion? I need to format the firt list into the same format as the second one. Python
print(incorrentformatlist)
'AsKh', '2sAc', '7hQs',...........
print(correctformatlist)
['As', 'Kh', '2s', 'Ac', '7h', 'Qs',..............]
\#I tried:
for h in incorrect_format_list:
split_lines = h.split(", ")
\#but the print output is this:
'AsKh'
'2sKh'
'7hQs'
... #rather than what i need: ['As', 'Kh', '2s', 'Ac', '7h', 'Qs'..............]
/r/Python
https://redd.it/10fvovh
reddit
Cnverting a List[string] into a List[list]...
Hello everyone, first post ever... can someone point me in the right direccion? I need to format the firt list into the same format as the second...