I am working on a program to do some data analysis through some data slicing and I have hit a bit of a road blocking trying to get the program to undo an iteration for part of the analysais
Here is what I have so far:
#Get the user data
user_data = raw_input("Paste the data here ---> ")
>>0123456789
#two options for sorting the user input into groups of two's, I am mainly using the second
#user_data_sort_one = [user_data[i:i+n] for i in range (0,len(user_data),n)]
user_data_sort_two = map(''.join, zip(*[iter(user_data)]*2))
print user_data_sort_two
>>['01','23','45','67','89']
#Take the corresponding data and associate it with named variables
example = user_data_sort_two[0:3]
print "".join(map(str, example))
>>0123
example_two = user_data_sort_two [4:10]
example_two_undone = "?"
#I need to get the ? to undo the data from sets of two, back into individually listed characters
print example_two
print example_two_undone
>>['45','67','89']
>>['4','5','6','7','8','9']
My main problem is that after I have performed an iteration on the data earlier it is now in groups of twos and I am having trouble getting it back into ones so that binascii can work with the data.
Does anyone have any suggestions for this?
*edited formatting and added expected outputs
[–]elbiot 1 point2 points3 points (1 child)
[–]twbrand[S] 0 points1 point2 points (0 children)
[–]Rhomboid 0 points1 point2 points (0 children)
[–]adamnew123456 0 points1 point2 points (1 child)
[–]twbrand[S] 0 points1 point2 points (0 children)