how do i get a string in python instead of an array?

This simple list comprehension should help you:

lst = [['1000399094'], ['1000399095'], ['1000399096'], ['1000399097'], ['1000399098'], ['1000399099'], ['1000399100'], ['1000399101'], ['1000399102']]

lst = [[int(num)] for lstt in lst for num in lstt]

print(lst)

Output:

[[1000399094], [1000399095], [1000399096], [1000399097], [1000399098], [1000399099], [1000399100], [1000399101], [1000399102]]

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top