BYDFi
Trade wherever you are!
Buy Crypto
New
Markets
Trade
Derivatives
common-fire-img
BOT
Events

How can I make a global variable in Python to store cryptocurrency prices?

Haransh SinghOct 06, 2020 · 5 years ago1 answers

I am working on a Python project that involves storing cryptocurrency prices. I want to create a global variable in Python to store these prices so that I can access them from different functions and modules. How can I achieve this? What is the best way to create and update a global variable in Python to store cryptocurrency prices?

1 answers

  • Haejï ŞaeMïM ÄřaebApr 28, 2022 · 3 years ago
    In conclusion, there are multiple ways to create a global variable in Python to store cryptocurrency prices. You can use the 'global' keyword, module-level variables, or even a database or caching system. The choice depends on the complexity and requirements of your project. Remember to choose a solution that is efficient and scalable for storing and accessing cryptocurrency prices.

优质推荐