调用的api接口:
https://api.exchangerate-api.com/v4/latest/USD
完整代码
import requests
from tkinter import *
import tkinter as tk
from tkinter import ttk
class RealTimeCurrencyConverter():
def __init__(self,url):
self.data = requests.get(url).json()
self.currencies = self.data['rates']
def