Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Sort
Popular
Most liked
Most recent
Time
Today
Last week
Last month
Last year
All time
Select Languages
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
ColdFusion
Command
CSS
Delphi
Django
Grunt
Gulp
HAML
HTML
iOS
Jade
Java
JavaScript
jQuery
Less
MySQL
Objective
Other
Pascal
Perl
PHP
PowerShell
Processing
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
Smarty
SQL
Swift
VHDL
XHTML
XML
Xojo
XSLT
SCSS
CoffeeScript
GLSL
Progress
Stylus
ES6
Coffee
TypeScript
X++
Haskell
SmallBASIC
JSX
SVG
Plain text
LUA
MDX
Apply
Reset
popular • Python
Test
Python
0
0
2866
Truncate HTML to a certain number of words
Python
0
0
3014
Collatz numbers
Python
0
0
3520
Sieve of Eratosthenes
Python
3
0
3728
Collatz 2
Python
0
0
3168
Better Sieve
Python
0
1
4095
Sudoku Checker
Python
5
1
9586
Spiral Matrix
Python
0
0
3432
Tkinter Framework
Python
0
0
3312
hi
Python
0
0
2574
finding a char in a string
Python
0
0
3418
readability.py
Python
0
1
3793
Test python code
Python
1
1
2558
python function decorator
Python
0
1
2200
hello
Python
1
1
2220
Fibonacci sequence
Python
0
8
2116
Oscar Riveros
Python
1
0
1976
Set / Get a tag from a configuration file
Python
0
0
2074
Random Youtube Link Generator
Python
1
3
3273
tarot.py
Python
0
1
2332