Feb-29-2024, 08:01 AM
hi
I saw the below snippet cod in a quiz on the net:
my question:
how can I know that an operator such as(+,*,- or /) can be used with a type( as string, list, tuple,...) and what is the result of it?
thanks
I saw the below snippet cod in a quiz on the net:
my_list=[1,2,3] print(my_list*3) print(3*my_list)in that quiz, the output of line 2 had been required.
my question:
how can I know that an operator such as(+,*,- or /) can be used with a type( as string, list, tuple,...) and what is the result of it?
thanks