Permalink
executable file
12 lines (9 sloc)
331 Bytes
|
#!/usr/bin/env python3 |
|
# -*- coding: utf-8 -*- |
|
|
|
print([x * x for x in range(1, 11)]) |
|
print([x * x for x in range(1, 11) if x % 2 == 0]) |
|
print([m + n for m in 'ABC' for n in 'XYZ']) |
|
|
|
d = {'x': 'A', 'y': 'B', 'z': 'C' } |
|
print([k + '=' + v for k, v in d.items()]) |
|
|
|
L = ['Hello', 'World', 'IBM', 'Apple'] |
|
print([s.lower() for s in L]) |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.