This file contains 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
# extracted from https://developers.google.com/public-data/docs/canonical/countries_csv | |
countries=[["AD","42.546245","1.601554","Andorra"],["AE","23.424076","53.847818","United Arab Emirates"],["AF","33.93911","67.709953","Afghanistan"],["AG","17.060816","-61.796428","Antigua and Barbuda"],["AI","18.220554","-63.068615","Anguilla"],["AL","41.153332","20.168331","Albania"],["AM","40.069099","45.038189","Armenia"],["AN","12.226079","-69.060087","Netherlands Antilles"],["AO","-11.202692","17.873887","Angola"],["AQ","-75.250973","-0.071389","Antarctica"],["AR","-38.416097","-63.616672","Argentina"],["AS","-14.270972","-170.132217","American Samoa"],["AT","47.516231","14.550072","Austria"],["AU","-25.274398","133.775136","Australia"],["AW","12.52111","-69.968338","Aruba"],["AZ","40.143105","47.576927","Azerbaijan"],["BA","43.915886","17.679076","Bosnia and Herzegovina"],["BB","13.193887","-59.543198","Barbados"],["BD","23.684994","90.356331","Bangladesh"],["BE","50.503887","4.469936","Belgium"],["BF","12.238333"," |
This file contains 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 os | |
def os_system(cmd): | |
z=str(os.system(cmd)) | |
return z.replace("u'","",1).replace("'","",z.count("'")) | |
os_system("echo hi") |
This file contains 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
bytesf=b'bytes string' | |
bytesf=str(bytesf).replace("b'","",1).replace("'","",str(bytesf).count("'")) | |
print(bytesf) # returns bytes string |