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

0 votes
Jul 6, 2019 in Python by Neha
• 330 points
1,380 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, 2019 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
1,913 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, 2019 in Python by Nisa
• 1,090 points
210 views
0 votes
4 answers

how to sort a list of numbers without using built-in functions like min, max or any other function?

I guess you are trying to do ...READ MORE

answered Dec 11, 2020 in Python by Rajiv
• 8,880 points
30,751 views
0 votes
1 answer

How to remove all of the data in a table using Django?

Hello @kartik, Inside a manager: def delete_everything(self): ...READ MORE

answered Aug 12, 2020 in Python by Niroj
• 82,560 points
107 views
0 votes
1 answer

How do I get the number of elements in a list?

Hello, The len() function can be used with several different ...READ MORE

answered Nov 18, 2020 in Python by Niroj
• 82,560 points
45 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 aryya
• 7,420 points
375 views
–1 vote
2 answers
0 votes
3 answers

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

FWIW, the multiprocessing module has a nice interface for ...READ MORE

answered Dec 15, 2020 in Python by Roshni
• 10,420 points
52,990 views