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 :: scikit learn decistion tree 
Python :: how to capitalize words in python 
Python :: how to install qrcode module in python 
Python :: django search pagination 
Python :: zoom in librosa.display.specshow() 
Python :: how to skip error python 
Python :: UserWarning: Failed to initialize NumPy: numpy.core.multiarray failed to import (Triggered internally at 
Python :: how to looks like a hacker 
Python :: list dictionary to json file python with tab 
Python :: How to find the most similar word in a list in python 
Python :: how to iterate through a pandas dataframe 
Python :: torch tensor equal to 
Python :: WSGIPassAuthorization on 
Python :: store in a variable the ocntent of a file python 
Python :: python all option 
Python :: python add column to a matrix 
Python :: python sepia filter 
Python :: how to sort subset of rows in pandas df 
Python :: how to save string json to json object python 
Python :: how to use histogram in python 
Python :: python class with optional arguments 
Python :: deepcopy python 
Python :: django pass list of fields to values 
Python :: pyplot aera 
Python :: Python get the name of the song that is playing 
Python :: get python ssl certificate location 
Python :: extract specific key values from nested dictionary 
Python :: python for loop float increment 
Python :: pyton count senteses in a text file 
Python :: convert decimal to float in python 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =