Python Forum
converting array to and from string in python 3.7.2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting array to and from string in python 3.7.2
#3
array('B', b'geek')
B for unsigned byte. Using the fact that array takes an iterable and iterating over bytestrings return integers.

By the way, the star import is a bad habbit.
Use instead:

from array import array
Imports from modle array the name array. In this case array is a function.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
RE: converting array to and from string in python 3.7.2 - by DeaD_EyE - Jun-28-2019, 12:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Converting python to FileMaker DWolf 6 1,771 Sep-22-2022, 03:40 AM
Last Post: DWolf
  Converting '1a2b3c' string to Dictionary PythonNoobLvl1 6 1,922 May-13-2022, 03:44 PM
Last Post: deanhystad
  Need help converting string to int dedesssse 7 2,741 Jul-07-2021, 09:32 PM
Last Post: deanhystad
  Beautify dictionary without converting to string. sharoon 6 3,455 Apr-11-2021, 08:32 AM
Last Post: buran
  Convert String of an int array to a Numpy array of ints mdsousa 5 5,748 Apr-08-2021, 08:00 PM
Last Post: mdsousa
  Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python Jeremy7 8 7,245 Mar-02-2021, 01:54 AM
Last Post: Jeremy7
  how to deal with problem of converting string to int usthbstar 1 2,012 Jan-05-2021, 01:33 PM
Last Post: perfringo
  Converting string to hex triplet menator01 4 4,401 Aug-03-2020, 01:00 PM
Last Post: deanhystad
  Create array from string steve87bg 4 3,213 Jul-13-2020, 07:55 PM
Last Post: jefsummers
  Make an array of string number in a List polantas 5 3,150 May-27-2020, 07:18 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020