Samuel Nwokenkwo added the comment:
To clarify
my expectation was something like this:
arr = multiprocessing.Array('c', 3) # type char
arr = "Fun"
which is similar to c implementation:
char arr[3] = "Fun"
AND
arr = multiprocessing.Array('b'
Samuel Nwokenkwo added the comment:
I completely wrote the wrong code:
So I'll copy and paste:
Scenario 1
import multiprocessing
br = multiprocessing.Array('c', 1)
br[0] = 's'
print(br[:])
Scenario 1 result = "TypeError: one charact
New submission from Samuel Nwokenkwo :
1st sequence:
arr = multiprocessing.Array("b", 1) # byte type
arr[0] = 's'.encode()
print(arr[:])
result is [115]
2nd sequence:
arr = multiprocessing.Array("c", 1) # character type
arr[0] = 's'