I am trying to figure out how do I get the 4 digits each time when I loop back for the data given below
li = ['1','1','7','1','2','1','1','4','1','6','7','8','1','8','1','0','1','B','1','N','1','Y','1','T','1','O']
as the output:
1171
2114
1678
1810
1B1N
Y1T1
Can Anyone help me out please?
Answer I suppose is like this
list=['1','2','3','4','5','6','5','4','7','8','9','1','0','6','4','3','4','5','4','7','8','9','0']
j=0
for i in len(list):
if i%4==0:
print("\n")
print(list[i],end=' ')