This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from urllib.request import Request, urlopen | |
import re | |
import datetime | |
import time | |
'''''''''''''''''''''''''''''''''''' | |
'''calculate the currency prices from exchangeratesapi''' | |
'''''''''''''''''''''''''''''''''''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fixSubtitleWithExtraLines(filePath): | |
oldSTR=[] | |
with open(filePath, "r") as f: | |
oldSTR=f.readlines() | |
newSTR=[] | |
for element in oldSTR: | |
'''remove all the line breaks''' | |
if element !="\n" : | |
newSTR.append(element) |