Skip to content

Instantly share code, notes, and snippets.

@bzdgn
Created October 8, 2016 15:22
Show Gist options
  • Save bzdgn/295dc7469e9dbfe5d4455873273c0958 to your computer and use it in GitHub Desktop.
Save bzdgn/295dc7469e9dbfe5d4455873273c0958 to your computer and use it in GitHub Desktop.
Python Samples
entries = [3, 2 , 'a', 'b' , 2 , 'c', 'd', 3, 'e', 'f', 'g']
numberOfEntries = entries[0]
i = 1;
elements = []
elIndex = 0
for index in range(numberOfEntries):
elements.append([])
numberOfElements = entries[i]
i += 1
for subIndex in range(numberOfElements):
elements[elIndex].append(entries[i])
i += 1
elIndex += 1
# Artik burada multi dimensional liste elinde
print(elements)
print("***************\n")
# ayri ayri bastirmak icin
for value in elements:
print(value)
print("***************\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment