Many thanks for all.
I used this code:
count = 3
urls = {}
def test(count):
a = 1
while a <= count:
urls[a] = 'test'
a += 1
test(count)
print(urls)
More Related Contents:
- Is there a way to ordinate numbers in a list?
- How to create the following lists with list comprehensions? [closed]
- Unable to use convert strings into integers for a for loop
- Printing the number from a list and its square on the same line in python3 [closed]
- how to unpack a tuple in this form (‘abc’, [20, 20])? [closed]
- Getting a map() to return a list in Python 3.x
- What do ellipsis […] mean in a list?
- Are lists thread-safe?
- Count frequency of words in a list and sort by frequency
- Calling filter returns [duplicate]
- Python 3 turn range to a list
- Extending list returns None [duplicate]
- Python – TypeError: ‘int’ object is not iterable
- Check if all elements of a list are of the same type
- How can I generate a list of consecutive numbers?
- filedialog, tkinter and opening files
- How to make a custom object iterable?
- Python range() and zip() object type
- Best way to check if an item is present in a list of lists? [duplicate]
- How do I return dictionary keys as a list in Python?
- “TypeError: ‘type’ object is not subscriptable” in a function signature
- Changing one dict changes all dicts in a list of dicts [duplicate]
- Appending to list in Python dictionary [duplicate]
- Deleting consonants from a string in Python
- Python – How to convert only numbers in a mixed list into float?
- How does str.startswith really work?
- Nested lambda statements when sorting lists
- Removing an item from a list of lists based on each of the lists first element
- Converting string to tuple without splitting characters
- name ‘times’ is used prior to global declaration – But IT IS declared