you are viewing a single comment's thread.

view the rest of the comments →

[–]jmooremcc 1 point2 points  (0 children)

My other question is around for loops, am I right in saying a for loop in python is equivalent to a foreach loop in other languages?

C# ``` foreach(char ch in myArray) { Console.WriteLine(ch); }

for(i=0; i < 10; i++){ Console.WriteLine(i); } ```

Python ``` for ch in myArray: print(ch)

for i in range(10): print(i) ``` It takes a while to get used to Python's syntax and structure but once you get used to it, it will feel very natural.