Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyStack
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#python 3.6.9 #PyStack: example of Python stack #this code is created by Rezaul Hoque on May 07,2022; #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; star=[] for k in range(0,9): if k%2==0: star.append('<') star.append('<') star.append('<') star.append('<') star.append('<') star.append('<') star.append('<') star.append('<') star.append('<') else: star.append('>') star.append('>') star.append('>') star.append('>') star.append('>') star.append('>') star.append('>') star.append('>') star.append('>') if k%2==0: print(star.pop()*9) else: print(star.pop()*9)
[
+
]
Show input
Absolute running time: 0.15 sec, cpu time: 0.02 sec, memory peak: 8 Mb, absolute service time: 0,32 sec
edit mode
|
history
|
discussion
<<<<<<<<< >>>>>>>>> <<<<<<<<< >>>>>>>>> <<<<<<<<< >>>>>>>>> <<<<<<<<< >>>>>>>>> <<<<<<<<<