@ReubenBakas/

Strings and two darrays

Python

add a brief description for this repl

fork
loading
Files
  • main.py
  • complicated stuuufff
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#creating a string called string
string = (
   "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors no w use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)."
)
#naming a list with an assinment operator
listOrArray = ['ArrayString', '2', 4, 'end of array']
#looks at the string and prints every third
print(string[0:40:3])
print(listOrArray[0:3])
#third in list is equal tyo the 3 part down in list of array
thirdInList = listOrArray[2]
#prints the second one in the list
print(thirdInList)
#prints 2 array down in two array
twoDArray = [["fiat", "500"], ["VW", "golf"], ["BMW", "3 Series",]]
#IT prints the 2 array down in twoarray
print(twoDArray[1])
#prints the first one in the list
print()
#skips a line
print(twoDArray[2][1])
#it prints the 3 list of the 2nd one.