Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python debugger

#preinstalled package
import pdb; pdb.set_trace()
Comment

debugging python

import ipdb; ipdb.set_trace()
Comment

python debugging

#you can get a visualization of your code at python tutor
#below there is a function that is suppossed to mutate a list
#and multiply it by 2
#using pythontutor.com copy the code below into python tutor, then follow steps
#step 1: click visualize execution
#step 2: hit next for each line of code and find the problem
#step 3: click on the line with the problem code to add a break point.
#step 4: hit next, or click the red line on the bar
#step 5: fix the code, comment and thank if this helps!

def mutate(a_list):
  b_list = []
  for item in a_list:
    new_item = item * 2
  b_list.append(new_item)
  print(b_list)

mutate([1,2,3,5,8,13])
Comment

PREVIOUS NEXT
Code Example
Python :: get n largest values from 2D numpy array matrix 
Python :: python match case 
Python :: python tkinter 
Python :: sanke in python 
Python :: how to print random in python 
Python :: smooth interpolation python 
Python :: how to check how many key value pairs are in a dict python 
Python :: argparse type 
Python :: standard noramlization 
Python :: django run command from code 
Python :: generate python 
Python :: how to get a list of all variables in memory python 
Python :: if statement python explained 
Python :: tree in python 
Python :: python order number list 
Python :: programação funcional python - lambda 
Python :: matplotlib multiple bar plot 
Python :: python print int operations 
Python :: python math exp 
Python :: round python print 
Python :: replace in python 
Python :: python write float with 2 decimals 
Python :: python - input: integer 
Python :: python random numbers 
Python :: pandas save dataframe with list 
Python :: frequency 
Python :: __dict__ 
Python :: get nth character of string python 
Python :: merge sorting algorithm 
Python :: how to remove some indexes from a dataframe in python 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =