+ 1

is * for multiplying numbers in python?

25th Sep 2016, 4:30 AM
sophie
sophie - avatar
3 Respostas
+ 6
In Python, * is also used to transform a list into just the list values. When used in this way, * is called "splat". See my code for example: https://code.sololearn.com/cxc841y4zrSQ/?ref=app
13th Jan 2018, 5:02 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 3
Not only, though. It can also be used on a list like so: [a] * 10 -> [a,a,a,a,a,a,a,a,a,a]
25th Sep 2016, 11:16 AM
Amaras A
Amaras A - avatar
0
Yes, it is
25th Sep 2016, 4:33 AM
Karoy
Karoy - avatar