class Stack: def __init__(self): self.stack = [] def add(self, dataval): # Use list append method to add element if dataval not in self.stack: self.stack.append(dataval) return True else: return False # Use peek to look at the top of the stack def peek(self): return self.stack[-1] AStack = Stack() AStack.add("Mon") AStack.add("Tue") AStack.peek() print(AStack.peek()) AStack.add("Wed") AStack.add("Thu") print(AStack.peek())
Boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document /title>
/head>
<body>
</body>
</html>
basic elements
1) section
<section> </section>
2) .example
<div class="example"> </div>
3) section#intro
<section id="intro"> </section>
4) p>lorem10
<p>Lorem ipsum dolor sit amet
consectetur adipisicing elit. Neque,
facere? </p>
5) section#intro>.container
<section id="intro">
<div class="container">
</div>
</section>
6) p{your custom text}
<p>your custom text </p>
7) link:css
<link rel="stylesheet" href="style.css">
8) script:src
<script src=""> </script>
9) h3+p+p
<h3> </h3>
<p> </p>
<p> </p>
10) ul>li*3^p*3
<ul>
<li> </li>
<li> </li>
<li> </li>
</ul>
<p> </p>
<p> </p>
<p> </p>
11) ul>li*4
<ul>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
12) h3+(ul>li*3)+h3
<h3> </h3>
<ul>
<li> </li>
<li> </li>
<li> </li>
</ul>
<h3> </h3>
13) li.list-item-$*3
<li class="list-item-1"> </li>
<li class="list-item-2"> </li>
<li class="list-item-3"> </li>
Comments
Post a Comment