0

Extract data from strings

Extract data from strings Test="test_13345688_20_abc_2021" Need below ouput 13345688,20 and abc Need all letters which are between underscore https://code.sololearn.com/c6lqosSWZcap/?ref=app Please help me

2nd Feb 2021, 10:18 PM
Raj Charan
3 Answers
+ 3
print(test.split('_')[1:-1]) # should works as you want
2nd Feb 2021, 10:37 PM
visph
visph - avatar
+ 3
What type of string? What type of values is this string holding . Why can't you guys put up a question properly so we don't have to tell you first.
2nd Feb 2021, 10:26 PM
Abhay
Abhay - avatar
0
Need to print all values between underscore "test_13345688_20_8_2021"
2nd Feb 2021, 10:28 PM
Raj Charan