Q:

Whats the difference between 'chr(32)' and 'chr(0)'?

Why even we have to have two characters like space ?
and why space is chr(32) and not chr(0) ?
also chr(160) is A half space ??

A:

chr(0) isn't actually a space, it's a NULL character. chr(n) returns the ASCII character for the number n.
When you print(chr(0)), it just prints the representation of the NULL character, which is nothing.
Observe:
>>> print('hi'+chr(0)+'hello')
hihello
>>> print('hi'+chr(32)+'hello')
hi hello

Note that NULL is not None, nor is it even an empty string:
>>> chr(0) is None
False
>>> chr(0) == ''
False

It is literally nothing.

A:

chr(0) is NULL character, which is very significant and chr(32) is ' '. The point of NULL character is to terminate strings for example. So what you see like x = "abcd" is actaully x = "abcd\00", where of course \00 is the same as chr(0). Without null character you would not be able to determine the end of strings, because what might happen is that you read string byte by byte, but right after "abcd"there is something else stored in memory, y = "efgh" for example. If there would be no null char at the end of x, calling print(x) would print 'abcdefgh' and maybe even more garbage that is not x because the computer would not know when to stop.

