This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.6; | |
contract Splitter { | |
mapping(address => uint) public balances; | |
function unsafeSplit(address address1, address address2) | |
public | |
payable | |
returns(bool success) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def does_haystack_contain_needle(haystack): | |
for thing in haystack: | |
if thing == 'needle': | |
return True | |
else: | |
return False | |
print does_haystack_contain_needle(['hay', 'hay', 'hay', 'hay', 'hay']) | |
print does_haystack_contain_needle(['hay', 'hay', 'hay', 'needle', 'hay', 'hay']) |