unit 2, 29 No links

I just don't get it what am I doing wrong, this below is my solution and all I added is

a check if start_link is -1 and if then return "None", 0

I got this:

Incorrect. Your procedure didn't work when given a string that doesn't contain any links. Make sure to return None, 0.

Please help, probably it is a bug, but anyway anyone, Grega from Slovenia

Modify the get_next_target procedure so that

if there is a link it behaves as before, but

if there is no link tag in the input string,

it outputs None, 0.

if start_link == -1:
    return "None", 0

asked 29 Feb '12, 06:36

legrega's gravatar image

legrega
902411
accept rate: 0%

retagged 16 Jan, 00:04

Retagbot's gravatar image

Retagbot ♦
1518171


2 Answers:

None should not be a String and i think the bold and larger Text isn't necessary.

link

answered 29 Feb '12, 06:42

KenavR's gravatar image

KenavR
5.2k32054

Get rid of the quotes, like this:

if(start_link == -1):
        return None, 0

None shouldn't be a string :)

link

answered 29 Feb '12, 06:43

Tom%20Lether's gravatar image

Tom Lether
1.3k1022

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,312
×59

Asked: 29 Feb '12, 06:36

Seen: 271 times

Last updated: 29 Feb '12, 06:43