Nov-19-2018, 06:23 PM
(This post was last modified: Nov-19-2018, 06:23 PM by ichabod801.)
A loop version of Gribouillis's solution, if you are not familiar with list comprehensions:
new_list = [] for sub_list in my_string: new_list.append([]) for item in sub_list: if item < 65: new_list[-1].append(None) else: new_list[-1].append(item - 12) my_string = new_listThey both do the same thing, the list comprehension syntax is just way more compact.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures