Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 553 Bytes

String_ends_with.md

File metadata and controls

40 lines (23 loc) · 553 Bytes

CodeWars Python Solutions


String ends with?

Complete the solution so that it returns true if the first argument(string) passed in ends with the 2nd argument (also a string).

Examples:

solution('abc', 'bc') # returns true
solution('abc', 'd') # returns false

Given Code

def solution(string, ending):
    pass

Solution

def solution(string, ending):
    return string.endswith(ending)

See on CodeWars.com