Created
August 29, 2018 19:04
-
-
Save mcihad/b12c07d4e442c7e99ba923bf8002cf2c to your computer and use it in GitHub Desktop.
Python String Birleştirme
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 f1(n): | |
import time | |
start=time.time() | |
a = ["Hi there "] | |
for i in range(n): | |
a.append(f"({i},{i}),") | |
s="".join(a) | |
end=time.time() | |
print(f"{n} adet deneme -> {end-start}") | |
return s | |
if __name__=="__main__": | |
f1(100000) | |
f1(1000000) | |
f1(10000000) | |
#100000 adet deneme -> 0.055971384048461914 | |
#1000000 adet deneme -> 0.5546951293945312 | |
#10000000 adet deneme -> 5.642395734786987 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment