Update Uptated-Prototype/Test-json.py
This commit is contained in:
@@ -71,8 +71,9 @@ y = json.dumps(x)
|
|||||||
z = json.loads(y)
|
z = json.loads(y)
|
||||||
|
|
||||||
for voice_id, info in z.items():
|
for voice_id, info in z.items():
|
||||||
lang = info["language"]["country_english"]
|
print((f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
||||||
print(lang)
|
|
||||||
|
# Removes duplicate languages choices from list
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
@@ -88,8 +89,7 @@ except FileNotFoundError:
|
|||||||
mylist = []
|
mylist = []
|
||||||
|
|
||||||
# Appends and formats all the languages to the list
|
# Appends and formats all the languages to the list
|
||||||
for voice_id, info in z.items():
|
for voice_id, info in data.items():
|
||||||
#print((f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
|
||||||
mylist.append(f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
mylist.append(f"{info["language"]["name_native"]} ({info["language"]["name_english"]}, {info["language"]["country_english"]})")
|
||||||
|
|
||||||
# Removes duplicate languages choices from list
|
# Removes duplicate languages choices from list
|
||||||
|
|||||||
Reference in New Issue
Block a user