You are viewing a single comment's thread from:

RE: Learn Basic Python Programming EP.3. - Logic & Loops

in #programming9 years ago

Explaining to others is a great way of making sure you understand something, it's a good thing to do once you feel like you master something. It also helps you figure out what you don't understand that well and look over it again.

The idea is that Python doesn't have a foreach syntax like other languages, instead the for loop works like a foreach would. If you have no idea what I'm talking about don't stress it, it's just a tip for whoever is coming from another language that has the classic for loop

for (element = 0; element < list; element++)

to remember that python's for is actually a foreach

foreach element in list:
___do stuff

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.098
BTC 64037.03
ETH 1842.56
USDT 1.00
SBD 0.38