py foreach

Solutions on MaxInterview for py foreach by the best coders in the world

showing results for - "py foreach"
Judith
29 Oct 2020
1// PHP:
2foreach ($array as $val) {
3    print($val);
4}
5
6// C#
7foreach (String val in array) {
8    console.writeline(val);
9}
10
11// Python
12for val in array:
13    print(val)
María Paula
25 Sep 2016
1names = ['tom', 'john', 'simon']
2
3namesCapitalized = [capitalize(n) for n in names]