June 12, 2023, 10:09 a.m. |
+ 1 |
for Comment
veky: No, str is a class. >>> type('') is str True When x is an instance of a class X, then x.method(y,z) ...
|
June 9, 2023, 9:33 a.m. |
+ 1 |
for Comment
veky: I think lambda is the least important here. Did you understand the rest of the solution? `(*_*)`
|
June 9, 2023, 9:33 a.m. |
+ 1 |
for Comment
veky: Try this: print(*map(int.__add__, [2, 5, 1], [1, 0, 7])) Do you understand what's going on there?
|
June 9, 2023, 9:31 a.m. |
+ 2 |
for
LISt Processing-veky
|
June 5, 2023, 3:06 p.m. |
+ 1 |
for Comment
veky: Thank you. :-) I code for almost 30 years now - tried many languages, was good in many of them, but ...
|
June 3, 2023, 3:22 p.m. |
+ 2 |
for
map can take more than 2 arguments-veky
|
May 10, 2023, 2:22 a.m. |
+ 1 |
for Comment
igharok: Because the string is splitted by spaces like this: 'hello world' = 'hello' + ' ' + '' + ' ' + '' + ...
|
May 10, 2023, 2:22 a.m. |
+ 1 |
for Comment
adogadkin: str.split(' ') will treat group of whitespaces as empty strings separated by whitespaces. 'hello wor...
|