Python Forum
Problem with "while and a string of characters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with "while and a string of characters
#2
I hardly looked at it and already strongly suspect it's this annoying "list parameters are references to external list not unique copies, so editing a list in a function will edit the external list as well". So you have to do this retarded workaround:
import copy #top of script
#then at function, deepcopy the lists so they are unique not references
def faceblanche90(REFligne1,REFligne2,REFligne3):
    ligne1=copy.deepcopy(REFligne1)
    ligne2=copy.deepcopy(REFligne2)
    ligne3=copy.deepcopy(REFligne3)
lemme know if that was the problem, its such a common snag I bet it was
Reply


Messages In This Thread
RE: Problem with "while and a string of characters - by ineedastupidusername - Nov-08-2017, 06:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  doing string split with 2 or more split characters Skaperen 22 2,708 Aug-13-2023, 01:57 AM
Last Post: Skaperen
  How do I check if the first X characters of a string are numbers? FirstBornAlbratross 6 1,609 Apr-12-2023, 10:39 AM
Last Post: jefsummers
  Convert string to float problem vasik006 8 3,511 Jun-03-2022, 06:41 PM
Last Post: deanhystad
Question [SOLVED] Delete specific characters from string lines EnfantNicolas 4 2,290 Oct-21-2021, 11:28 AM
Last Post: EnfantNicolas
  f string concatenation problem growSeb 3 2,311 Jun-28-2021, 05:00 AM
Last Post: buran
Question Problem with string and \n Falassion 6 2,758 Jun-15-2021, 03:59 PM
Last Post: Falassion
  Extract continuous numeric characters from a string in Python Robotguy 2 2,698 Jan-16-2021, 12:44 AM
Last Post: snippsat
  how to deal with problem of converting string to int usthbstar 1 2,024 Jan-05-2021, 01:33 PM
Last Post: perfringo
  Python win32api keybd_event: How do I input a string of characters? JaneTan 3 3,896 Oct-19-2020, 04:16 AM
Last Post: deanhystad
  string problem Mathisdlg 6 2,942 Aug-05-2020, 09:31 AM
Last Post: Mathisdlg

Forum Jump:

User Panel Messages

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