Skip to content
Advertisement

How to use a variable as dictionary key using f-string in python?

I’m trying to print dictionary item value of a dictionary but my item is also an another user input variable. How can I print the selected value with f-string?

JavaScript

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement