فرض کنید، اطلاعات کلیه سهام شرکت ها را در قالب فایل های csv در یک پوشه ذخیره کرده اید. در صورتی که بخواهید همه فایل ها را با هم باز کنید و یک عمل روی آنها انجام بدهید لازم است از کتابخانه os کمک بگیرید. دستورات زیر محتوای تمام فایل های پوشه جاری را نمایش می دهد.
import os try: for file in os.listdir(): if os.path.isfile(file): fin = open(file) print (fin.read()) fin.close() except: print ('Error')
فرض کنید، اطلاعات کلیه سهام شرکت ها را در قالب فایل های csv در یک پوشه ذخیره کرده اید. در صورتی که بخواهید همه فایل ها را با هم باز کنید و یک عمل روی آنها انجام بدهید لازم است از کتابخانه os کمک بگیرید. دستورات زیر محتوای تمام فایل های پوشه جاری را نمایش می دهد.
import os try: for file in os.listdir(): if os.path.isfile(file): fin = open(file) print (fin.read()) fin.close() except: print ('Error')
n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”
A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.