How to get the multiplication table of any number using list comprehension?

0 votes
Jul 6 in Python by Neha
• 330 points
34 views

1 answer to this question.

0 votes

Hey @Neha, you can use something like this:

multiples = [n * 5 for n in range(1, 15)]
print multiples
output:
[5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70]

Process finished with exit code 0
answered Jul 8 by Sakshi

Related Questions In Python

0 votes
1 answer

Using list comprehension how to call list of function

For the class method when used as ...READ MORE

answered Nov 14, 2018 in Python by Theodor
• 740 points
173 views
0 votes
1 answer

How to count the number of elements in a list?

To count the number of elements of ...READ MORE

answered May 27 in Python by Nisa
• 1,090 points
15 views
0 votes
1 answer
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by ariaholic
• 7,340 points
90 views
0 votes
1 answer

How can I get the count of a list in Python?

len() >>> mylist=[] >>> print len(mylist) 0 READ MORE

answered Dec 12, 2018 in Python by charlie_brown
• 7,720 points
69 views
0 votes
1 answer

What is the recommended way to randomize a list of strings using Python?

Hi. Nice question. Here is the simplified answer ...READ MORE

answered Jan 18 in Python by Nymeria
• 3,520 points
49 views
0 votes
1 answer

How to get the return value from a thread using python?

You don't need to change your existing ...READ MORE

answered Dec 3, 2018 in Python by Nymeria
• 3,520 points

edited Dec 19, 2018 by Nymeria 10,290 views