I am new to Python and I have some experience in C#. I am looking for an equivalent function in python for iteration of all the items in collection.
names = ['joy', 'sam', 'dan']
marks = [ 3, 4, 7, 2, 1]
You can use a for loop as an equivalent as such:
for f in names:
Its also interesting to observe this
To iterate ...READ MORE
Every occurence of "foreach" I've seen (PHP, ...READ MORE
Gotos are universally reviled in computer science ...READ MORE
Yes, there is a "foreach" in python. ...READ MORE
suppose you have a string with a ...READ MORE
if you google it you can find. ...READ MORE
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
result = "F" if(isfemale_bit) else "M"
Try this ...READ MORE
To indent the block, select the entire ...READ MORE
Already have an account? Sign in.