{ "metadata": { "name": "", "signature": "sha256:383dbd07426142dba085750cea664fb5a2eb5d274834904c9266a800ddf86c5c" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "def anagram1(word1, word2):\n", " return sorted(word1) == sorted(word2)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "anagram1('happy', 'sad')" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "False" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "anagram1('happy', 'hpayp')" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "True" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }