+ 4

For inside for and join

for i in a: print("".join([k*v for k,v in i])) could someone explain this?

7th Feb 2018, 9:26 AM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
4 Answers
+ 20
"".join is used to convert list into string since in the 1st two elements k is none so only 5#s will be obtained by k*v thing... '#'*5=##### if there are other elements it will be evaluated accordingly... concept will be same... Good Luck with python
7th Feb 2018, 10:01 AM
šŸŒ›DTšŸŒœ
šŸŒ›DTšŸŒœ - avatar
+ 3
a is something like this [[(' ', 95)], [(' ', 14), ('#',5)....]] so when we run the code a word appear in hashs ### I didn't understand what has happend no enemurate used
7th Feb 2018, 9:55 AM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
+ 3
I think I have understand it thank you
7th Feb 2018, 10:04 AM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
0
while
8th Feb 2018, 11:42 AM
Š”Š»Š°Š²Š° ŠšŠ»ŠøшŠøŠ½
Š”Š»Š°Š²Š° ŠšŠ»ŠøшŠøŠ½ - avatar