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
#1
I am not able to convert array to string using fromstring() method
my code is:
from array import *
my_char_array = array('c', ['g','e','e','k'])
Error:
Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> my_char_array = array('c', ['g','e','e','k']) ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)
Reply


Messages In This Thread
converting array to and from string in python 3.7.2 - by srm - Jun-28-2019, 11:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Converting python to FileMaker DWolf 6 1,782 Sep-22-2022, 03:40 AM
Last Post: DWolf
  Converting '1a2b3c' string to Dictionary PythonNoobLvl1 6 1,927 May-13-2022, 03:44 PM
Last Post: deanhystad
  Need help converting string to int dedesssse 7 2,745 Jul-07-2021, 09:32 PM
Last Post: deanhystad
  Beautify dictionary without converting to string. sharoon 6 3,461 Apr-11-2021, 08:32 AM
Last Post: buran
  Convert String of an int array to a Numpy array of ints mdsousa 5 5,768 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,258 Mar-02-2021, 01:54 AM
Last Post: Jeremy7
  how to deal with problem of converting string to int usthbstar 1 2,016 Jan-05-2021, 01:33 PM
Last Post: perfringo
  Converting string to hex triplet menator01 4 4,408 Aug-03-2020, 01:00 PM
Last Post: deanhystad
  Create array from string steve87bg 4 3,215 Jul-13-2020, 07:55 PM
Last Post: jefsummers
  Make an array of string number in a List polantas 5 3,157 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