I have this string my_string = '717460881855742062' how can I split it in half? The string is auto-generated so just splitting by the 1 won't work
my_string = '717460881855742062'
1
You can try do this way:
firsthalf, secondhalf = my_string[:len(my_string)//2], my_string[len(my_string)//2:]
1.4m articles
1.4m replys
5 comments
56.9k users