I want to get the first element of a dict, "names(1)" doesn’t work.
names = {"John":20, "Marc":22, "Dwayne":23}
print(names(1))
>Solution :
You can get the first element of it (only in versions with ordered dictionaries) with
print(next(iter(names)))
In names = {"John":20, "Marc":22, "Dwayne":23} outuput is "John"