Convert dictionary keys to a list

0 votes
Is there a simply way to accomplish this? I need all the keys of a dictionary stored in a list.
Jun 28, 2018 in Python by nightshade
• 870 points
61 views

1 answer to this question.

0 votes
list.(dictionary.keys())
answered Jun 28, 2018 by Hamartia's Mask
• 1,580 points

Related Questions In Python

0 votes
1 answer

Convert the keys of a dictionary to list

Unpacking with * works with any object ...READ MORE

answered Feb 6, 2019 in Python by Omkar
• 69,040 points
59 views
0 votes
1 answer
0 votes
1 answer

Add new keys to a dictionary?

>>> d = {'key':'value'} >>> print(d) {'key': ...READ MORE

answered Aug 13, 2018 in Python by Priyaj
• 57,550 points
47 views
+1 vote
1 answer

How to convert records from csv to a list in Python?

If you are using Python 3.x then ...READ MORE

answered Jun 25, 2019 in Python by Arvind
• 2,980 points

edited Jun 26, 2019 by Kalgi 1,121 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,180 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer

Combine list items to a string

>>> stmt = ['this','is','a','statement'] >>> ' '.join(sentence) 'this is ...READ MORE

answered Jun 7, 2018 in Python by Hamartia's Mask
• 1,580 points
41 views
0 votes
1 answer

Deleting a list element by value

Use the remove() function: >>> p = [1, ...READ MORE

answered May 11, 2018 in Python by Hamartia's Mask
• 1,580 points
40 views