diff --git a/python-temel/f.write.with.open.py b/python-temel/f.write.with.open.py new file mode 100644 index 0000000..8081c94 --- /dev/null +++ b/python-temel/f.write.with.open.py @@ -0,0 +1,2 @@ +with open('test.txt', 'w', encoding='utf-8') as f: + f.write('ağrı dağı') diff --git a/python-temel/import.locale.py b/python-temel/import.locale.py new file mode 100644 index 0000000..c4c4cd7 --- /dev/null +++ b/python-temel/import.locale.py @@ -0,0 +1,3 @@ +import locale + +print(locale.getpreferredencoding(False)) diff --git a/python-temel/test.txt b/python-temel/test.txt index 2804001..60ff55f 100644 --- a/python-temel/test.txt +++ b/python-temel/test.txt @@ -1,4 +1 @@ -a = 10 -b = 20 -c = a + b -print(c) +ağrı dağı \ No newline at end of file