... | ... | @@ -91,9 +91,9 @@ The **null sequences** are created by calling the **Seq() class** with **no** ar |
|
|
|
|
|
```python3
|
|
|
# -- Creating a Null sequence
|
|
|
s = Seq()
|
|
|
s1 = Seq()
|
|
|
# -- Creating a valid sequence
|
|
|
s = Seq("TATAC")
|
|
|
s2 = Seq("TATAC")
|
|
|
```
|
|
|
|
|
|
The difference between the creation of the previous two objects is that the first one has no arguments when calling Seq, and the second one has one (a sequence). This means that the **argument** provided to the **\__init()\_\_** method is **optional**.
|
... | ... | @@ -122,7 +122,7 @@ When a null sequence is created, the **\__init()\_\_** method will print the mes |
|
|
NULL sequence created
|
|
|
New sequence created!
|
|
|
Sequence 1: NULL
|
|
|
Sequence 2: ACTGA
|
|
|
Sequence 2: TATAC
|
|
|
```
|
|
|
|
|
|
* **Considerations**: The first you should do in the **\__init()\_\_** method is checking if it is a null sequence. If so, print the message on the console, assign the value to the **self.strbases** attribute and return. If it is not null, continue with the other checks.
|
... | ... | |