+a few posts

    
      
diff --git a/pythonetc/README.md b/pythonetc/README.md
index 90caa28..a6de598 100644
--- a/pythonetc/README.md
+++ b/pythonetc/README.md
@@ -1,4 +1,4 @@
-## Plan
+# Plan
 
 1. ./intro.md (26 May 2020, 18:00)
 
@@ -66,7 +66,29 @@ More:
 1. ./index.md                   (19 November 2020, 18:00)
 1. ./qualname.md                (24 November 2020, 18:00)
 1. ./digits.md                  (26 November 2020, 18:00)
+1. ./ipython.md
+1. ./array.md
 
 Out of order:
 
 1. ./match.md                   (26 June 2020, 18:00)
+1. ./snippets/to-str-2.md       (30 September 2020, 18:00)
+
+## TODO
+
+Json indent
+JSON custom loader
+Csv instead of xls
+Turtle
+Bytearray
+Subprocess and env vars
+Subprocess pipe
+Fnmatch?
+Emoji by name in a string
+Unicode module
+String.Template
+String module consts
+Urllib
+Always compile regexp
+Re.Verbose
+Tau vs pi
diff --git a/pythonetc/array.md b/pythonetc/array.md
new file mode 100644
index 0000000..4f6c0db
--- /dev/null
+++ b/pythonetc/array.md
@@ -0,0 +1,22 @@
+The module [array](https://t.me/pythonetc/124) is helpful if you want to be memory efficient or interoperate with C. However, working with array can be actually slower than with list:
+
+```python
+In [1]: import random
+In [2]: import array
+In [3]: lst = [random.randint(0, 1000) for _ in range(100000)]
+In [4]: arr = array.array('i', lst)
+
+In [5]: %timeit for i in lst: pass
+1.05 ms ± 1.61 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
+
+In [6]: %timeit for i in arr: pass
+2.63 ms ± 60.2 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
+
+In [7]: %timeit for i in range(len(lst)): lst[i]
+5.42 ms ± 7.56 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
+
+In [8]: %timeit for i in range(len(arr)): arr[i]
+7.8 ms ± 449 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
+```
+
+The reason is that because `int` in Python is a [boxed object](https://en.wikipedia.org/wiki/Object_type#Boxing), and wrapping raw integer value into Python `int` takes some time.
diff --git a/pythonetc/ipython.md b/pythonetc/ipython.md
new file mode 100644
index 0000000..132e948
--- /dev/null
+++ b/pythonetc/ipython.md
@@ -0,0 +1,8 @@
+[IPython](https://ipython.org/) is an alternative interactive shell for Python. It has syntax highlighting, powerful introspection and autocomplete, searchable cross-session history, and much more. Run `%quickref` in IPython to get a quick reference on useful commands and shortcuts. Some of our favorite ones:
+
++ `obj?` - print a short object info, including signature and docstring.
++ `obj??` - same as above but also shows the object source code if available.
++ `!cd my_project/` - execute a shell command.
++ `%timeit list(range(1000))` - run a statement many times and show the execution time statistics.
++ `%hist` - show the history for the current session.
++ `%run` - run a file in the current session.
diff --git a/pythonetc/snippets/to-str-2.md b/pythonetc/snippets/to-str-2.md
new file mode 100644
index 0000000..45b2db3
--- /dev/null
+++ b/pythonetc/snippets/to-str-2.md
@@ -0,0 +1,75 @@
+The point of the post above was that for some simple tasks there are many ways to do it (and some ways are good only in some cases). Also, the number of possible solutions grows as the language evolves. Another good example is concatenation. You can join 2 strings with f-strings, `str.format`, `str.join`, `+`, and so on. Thinking about these ways, even not suitable for daily usage, helps better language understanding.
+
+Our amazing subscribers decided to take the challenge. Below are some not suitable for work but fan solutions how to convert int to str.
+
+@dedefer:
+
+```python
+import io
+with io.StringIO() as f:
+    print(n, end='', file=f)
+    n_str = f.getvalue()
+```
+
+Evgeny:
+
+```python
+import ctypes
+ctypes.cdll.LoadLibrary('libc.so.6').printf(b'%d', n)
+```
+
+If you're going to use solutions below on the production, keep in mind that it doesn't work with negative numbers.
+
+@oayunin:
+
+```python
+from math import log10
+''.join(['0123456789'[(n // 10 ** i) % 10] for i in range(int(log10(n)), -1, -1)])
+```
+
+A similar solution from @apatrushev:
+
+```python
+''.join(chr(t + 48) for t in (n // 10**x % 10 for x in reversed(range(int(math.log(n,10)) + 1))) if t)
+```
+
+A similar solution with lambdas from @antonboom:
+
+```python
+(lambda n:
+  ''.join(
+    chr(ord('0') + (n // (10**i)) % 10)
+    for i in range(math.ceil(math.log(n, 10)) - 1, -1, -1)
+  )
+)(n)
+```
+
+One more from @oayunin:
+
+```python
+from subprocess import check_output
+with open('/tmp/tmp.txt', 'w') as f:
+  for x in range(n):
+    f.write(' ')
+check_output(['wc', '-c', '/tmp/tmp.txt']).decode().split()[0]
+```
+
+@orsinium:
+
+```python
+import sys
+import subprocess
+cmd = [sys.executable, '-c', 'print(len("' + '*' * n + '"))']
+subprocess.run(cmd, capture_output=True).stdout.strip().decode()
+```
+
+@maxvyaznikov:
+
+```python
+chars = []
+while n > 0:
+    digit = n % 10
+    n = int(n / 10)
+    chars.append(chr(ord('0') + digit))
+print(''.join(chars[::-1]))
+```